<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="${map.package}.${map.preTable}.mapper.${map.module?cap_first}Mapper">
    <!-- 用于select查询公用抽取的列 -->
    <sql id="Base_Column_List">
        <#list columnList as var>
            `${var.name}`<#if var_has_next>,</#if>
        </#list>
    </sql>

    <!-- ================================autoCode at: ${.now?string("yyyy-MM-dd")}=========================================== -->
    <resultMap id="BaseResultMap" type="${map.package}.${map.preTable}.entity.dto.${map.module?cap_first}Dto">
        <#list columnList as var>
            <#if var.type?index_of("(") == -1>
                <#assign type = var.type>
            <#else >
                <#assign type = var.type?substring(0, var.type?index_of("("))>
            </#if>
            <result column="${var.name}" property="${var.name}"
                    jdbcType="<#if type == "int">INTEGER<#elseif type="tinyint">TINYINT<#elseif type="datetime">TIMESTAMP<#else >VARCHAR</#if>"/>
        </#list>
    </resultMap>

</mapper>